import { Swiper, Toast } from 'antd-mobile'
import './home.css'
const colors = ['#ace0ff', '#bcffbd', '#e4fabd', '#ffcfac']
const items = colors.map((color, index) => (
    <Swiper.Item key={index}>
        <div
            className="content"
            style={{ background: color }}
            onClick={() => {
                Toast.show(`你点击了卡片 ${index + 1}`)
            }}
        >
            {index + 1}
        </div>
    </Swiper.Item>
))
function Home() {
    return (
        <div>
            <h1>Home</h1>
            <Swiper>{items}</Swiper>

        </div>
    )
}
export default Home